package com.probiz.estore.common.model.order.base;

import java.io.Serializable;
import com.probiz.estore.core.model.BaseObject;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;

/**
 * OrderPick Base Java Bean, base class for the model, mapped directly to database table
 * 
 * Avoid changing this file if not necessary, will be overwritten. 
 *
 */
public class OrderPickTbl extends BaseObject implements Serializable {

    protected Integer orderPickId;
	protected String documentNo;
	protected String memo;
	protected java.util.Date createTime;
	protected java.util.Date updateTime;
	protected Integer createdBy;
	protected Integer updateBy;

	protected java.util.Set orderPickItems = new java.util.LinkedHashSet();

	/**
	 * Default Empty Constructor for class OrderPick
	 */
	public OrderPickTbl () {
		super();
	}
	
	/**
	 * Default Key Fields Constructor for class OrderPick
	 */
	public OrderPickTbl (
		 Integer in_orderPickId
        ) {
		this.setOrderPickId(in_orderPickId);
    }


	public java.util.Set getOrderPickItems () {
		return orderPickItems;
	}	
	
	public void setOrderPickItems (java.util.Set in_orderPickItems) {
		this.orderPickItems = in_orderPickItems;
	}
    

	/**
	 * 	 * @return Integer
     * @hibernate.id column="orderPickId" type="java.lang.Integer" generator-class="native"
	 */
	public Integer getOrderPickId() {
		return this.orderPickId;
	}
	
	/**
	 * Set the orderPickId
	 */	
	public void setOrderPickId(Integer aValue) {
		this.orderPickId = aValue;
	}	

	/**
	 * 备货单号	 * @return String
	 * @hibernate.property column="documentNo" type="java.lang.String" length="32" not-null="true" unique="false"
	 */
	public String getDocumentNo() {
		return this.documentNo;
	}
	
	/**
	 * Set the documentNo
	 * @spring.validator type="required"
	 */	
	public void setDocumentNo(String aValue) {
		this.documentNo = aValue;
	}	

	/**
	 * 备注	 * @return String
	 * @hibernate.property column="memo" type="java.lang.String" length="1024" not-null="false" unique="false"
	 */
	public String getMemo() {
		return this.memo;
	}
	
	/**
	 * Set the memo
	 */	
	public void setMemo(String aValue) {
		this.memo = aValue;
	}	

	/**
	 * 	 * @return java.util.Date
	 * @hibernate.property column="createTime" type="java.util.Date" length="19" not-null="true" unique="false"
	 */
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * Set the createTime
	 * @spring.validator type="required"
	 */	
	public void setCreateTime(java.util.Date aValue) {
		this.createTime = aValue;
	}	

	/**
	 * 	 * @return java.util.Date
	 * @hibernate.property column="updateTime" type="java.util.Date" length="19" not-null="true" unique="false"
	 */
	public java.util.Date getUpdateTime() {
		return this.updateTime;
	}
	
	/**
	 * Set the updateTime
	 * @spring.validator type="required"
	 */	
	public void setUpdateTime(java.util.Date aValue) {
		this.updateTime = aValue;
	}	

	/**
	 * 	 * @return Integer
	 * @hibernate.property column="createdBy" type="java.lang.Integer" length="10" not-null="false" unique="false"
	 */
	public Integer getCreatedBy() {
		return this.createdBy;
	}
	
	/**
	 * Set the createdBy
	 */	
	public void setCreatedBy(Integer aValue) {
		this.createdBy = aValue;
	}	

	/**
	 * 	 * @return Integer
	 * @hibernate.property column="updateBy" type="java.lang.Integer" length="10" not-null="false" unique="false"
	 */
	public Integer getUpdateBy() {
		return this.updateBy;
	}
	
	/**
	 * Set the updateBy
	 */	
	public void setUpdateBy(Integer aValue) {
		this.updateBy = aValue;
	}	

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof OrderPickTbl)) {
			return false;
		}
		OrderPickTbl rhs = (OrderPickTbl) object;
		return new EqualsBuilder()
				.append(this.orderPickId, rhs.orderPickId)
				.append(this.documentNo, rhs.documentNo)
				.append(this.memo, rhs.memo)
				.append(this.createTime, rhs.createTime)
				.append(this.updateTime, rhs.updateTime)
				.append(this.createdBy, rhs.createdBy)
				.append(this.updateBy, rhs.updateBy)
				.isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973)
				.append(this.orderPickId) 
				.append(this.documentNo) 
				.append(this.memo) 
				.append(this.createTime) 
				.append(this.updateTime) 
				.append(this.createdBy) 
				.append(this.updateBy) 
				.toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this)
				.append("orderPickId", this.orderPickId) 
				.append("pickNo", this.documentNo) 
				.append("memo", this.memo) 
				.append("createTime", this.createTime) 
				.append("updateTime", this.updateTime) 
				.append("createdBy", this.createdBy) 
				.append("updateBy", this.updateBy) 
				.toString();
	}

	/**
	 * Return the name of the first key column
	 */
	public String getFirstKeyColumnName() {
		return "orderPickId";
	}
	/**
	 * Return the Id (pk) of the entity, must be Integer
	 */
	public Integer getId() {
		return orderPickId;
	}

}